package com.example.permission.mapper;

import com.example.permission.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface RoleMapper {
    // 任务二：根据角色ID查询角色及其菜单
    Role selectRoleWithMenusById(@Param("roleId") Long roleId);

    // 任务二：根据角色名称查询角色及其菜单
    Role selectRoleWithMenusByKey(@Param("roleKey") String roleKey);
}